package com.wwy.monitor.util;

/**
 * gezhen
 */
public class MailUtils {
    public static String replaceEmailAddress(String address) {
        try {
            if (address != null && !"".equals(address)) {
                if (address.contains("<") && address.contains(">")) {
                    address = address.substring(address.indexOf("<") + 1, address.indexOf(">"));
                }
                if (address.contains("list.")) {
                    return address;
                }
                int index = address.indexOf("@");
                if (index >= 0) {
                    String result = address.substring(0, index + 1);
                    result += "alibaba-inc.com";
                    return result;
                }
            }
            return address;
        } catch (Exception e) {
        }
        return "";
    }
}